package objects;

public class Partition {
	static int halfH = 0;
	static int halfW = 0;
	static int height = 0;
	static int width = 0;
	int startX;
	int stopX;
	int startY;
	int stopY;
	
	Partition(int width, int height, int quarter) {
		Partition.width = width;
		Partition.height = height;
		Partition.halfH = (int) Math.floor(height);
		Partition.halfW = (int) Math.floor(width);
		if (quarter == 1) {
			this.startX = 0;
			this.startY =0;
			this.stopX = Partition.halfW;
			this.stopY = Partition.halfH;
		} else if (quarter == 2) {
			this.startX = halfW;
			this.startY =0;
			this.stopX = width;
			this.stopY = Partition.halfH;
		} else if (quarter == 3) {
			this.startX = 0;
			this.startY = Partition.halfH;
			this.stopX = halfW;
			this.stopY = Partition.height;
		} else if (quarter == 4) {
			this.startX = Partition.halfW;
			this.startY = Partition.halfH;
			this.stopX = Partition.width;
			this.stopY = Partition.height;
		} else if(quarter == 0){
			this.startX = 0;
			this.startY = 0;
			this.stopX = Partition.width;
			this.stopY = Partition.height;		
		} else {
			System.err.println("Nie ma takiej cwiartki");
		}
	}
}
